package RPS;

import java.util.ArrayList;
import java.util.List;

public class Player {
	
	String name;
	int score;
	List moves;
	
	
	public Player(String name, List moves) {
		this.name=name;
		this.score=0;
		this.moves=moves;
	}
	
	public Player(String name) {
		this.name=name;
		this.score=0;
		moves=new ArrayList<RPSEnum>();
		int nb;
		for(int i=0; i<10; i++) {
			nb=(int) (Math.random()*2);
			if(nb==0) {
				this.moves.add(RPSEnum.PAPER);
			}
			if(nb==1) {
				this.moves.add(RPSEnum.SCISSORS);
			}
			if(nb==2) {
				this.moves.add(RPSEnum.ROCK);
			}
		}
	}

	public String getName() {
		return name;
	}


	public int getScore() {
		return score;
	}

	public int getNumberOfMoves() {
		return moves.size();
	}
	
	public RPSEnum getNextMove(int i){
		return (RPSEnum) moves.get(i);
	}
	
	public void setScore(int i) {
		score=score + i;
	}

	
	
}
